<template>
  <BtnGroup title="备注说明类型" :status="status[currentStatus]">
    <el-button-group class="">
      <el-button
        v-for="(item, index) in status"
        :class="{
          select: currentStatus === index,
        }"
        @click="changeStatus(index)"
      >
        <font-awesome-icon v-if="index === 0" :icon="['fas', 'heading']" />
        <font-awesome-icon v-else :icon="['fas', 'paragraph']" />
      </el-button>
    </el-button-group>
  </BtnGroup>
</template>

<script setup lang="ts">
import BtnGroup from './components/BtnGroup.vue'
import type { VueComType } from '@/types'

const props = defineProps<{
  configKey: string
  id: string
  status: string[]
  currentStatus: number
  isShow: boolean
  editCom: VueComType
}>()
const updateStatus = inject('updateStatus') as Function

const changeStatus = (index: number) => {
  updateStatus(props.configKey, index)
}
</script>

<style scoped></style>
